<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>星链</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    }

    :root {
        --primary: #4361ee;
        --secondary: #3a0ca3;
        --accent: #4cc9f0;
        --light: #f8f9fa;
        --dark: #1d3557;
        --gray: #6c757d;
        --light-gray: #e9ecef;
        --border: #dee2e6;
        --success: #4ade80;
        --warning: #f59e0b;
        --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        --transition: all 0.3s ease;
    }

    body {
        background-color: #f5f7fa;
        color: #333;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* 顶部导航栏 - 自定义Logo区域 */
    .header {
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 25px;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .logo-container {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .custom-logo {
        height: 40px;
        width: auto;
        object-fit: contain;
    }

    .logo-text {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--dark);
    }

    .nav-links {
        display: flex;
        gap: 30px;
    }

    .nav-item {
        padding: 8px 0;
        position: relative;
        cursor: pointer;
        font-weight: 500;
        color: var(--gray);
    }

    .nav-item.active, .nav-item:hover {
        color: var(--primary);
    }

    .nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--primary);
        border-radius: 3px;
    }

    .user-area {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .vip-badge {
        background: linear-gradient(135deg, #ffd700, #ff9800);
        color: #fff;
        padding: 5px 12px;
        border-radius: 30px;
        font-size: 0.85rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent), var(--primary));
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
    }

    /* 主内容区 */
    .main-content {
        display: flex;
        flex: 1;
    }

    /* 左侧菜单 */
    .sidebar {
        width: 240px;
        background: white;
        height: calc(100vh - 60px);
        position: sticky;
        top: 60px;
        padding: 25px 0;
        border-right: 1px solid var(--border);
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.02);
    }

    .menu-title {
        padding: 0 25px;
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 15px;
        color: var(--dark);
    }

    .menu-item {
        padding: 12px 25px;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        transition: var(--transition);
        color: var(--gray);
    }

    .menu-item:hover {
        background: rgba(67, 97, 238, 0.05);
        color: var(--primary);
    }

    .menu-item.active {
        background: rgba(67, 97, 238, 0.1);
        color: var(--primary);
        border-left: 4px solid var(--primary);
    }

    /* 右侧内容区 */
    .content-area {
        flex: 1;
        padding: 30px;
    }

    .content-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
    }

    .page-title {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--dark);
        position: relative;
        padding-bottom: 10px;
    }

    .page-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 60px;
        height: 4px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        border-radius: 2px;
    }

    .action-buttons {
        display: flex;
        gap: 15px;
    }

    .btn {
        padding: 10px 20px;
        border-radius: 6px;
        border: none;
        font-weight: 500;
        cursor: pointer;
        transition: var(--transition);
        display: inline-flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .btn-primary {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
    }

    .btn-outline {
        background: transparent;
        border: 1px solid var(--primary);
        color: var(--primary);
    }

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* 档案卡片 */
    .profile-card {
        background: white;
        border-radius: 12px;
        box-shadow: var(--card-shadow);
        overflow: hidden;
        display: flex;
        max-width: 1000px;
        margin: 0 auto;
        border: 1px solid #f0f2f5;
    }

    .profile-left {
        width: 35%;
        background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
        padding: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-photo {
        width: 180px;
        height: 220px;
        background: white;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 25px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border: 1px solid #e9ecef;
    }

    .profile-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .profile-photo-placeholder {
        text-align: center;
        color: var(--gray);
    }

    .profile-photo-placeholder i {
        font-size: 3rem;
        color: #ced4da;
        margin-bottom: 10px;
    }

    .photo-action {
        background: rgba(255, 255, 255, 0.8);
        padding: 8px 15px;
        border-radius: 30px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: var(--transition);
        border: 1px solid #e9ecef;
    }

    .photo-action:hover {
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .profile-right {
        flex: 1;
        padding: 30px;
    }

    .profile-section {
        margin-bottom: 25px;
    }

    .section-title {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 15px;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border);
    }

    .info-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .info-item {
        display: flex;
        flex-direction: column;
    }

    .info-label {
        font-size: 0.95rem;
        color: var(--gray);
        margin-bottom: 5px;
    }

    .info-value {
        font-size: 1.1rem;
        font-weight: 500;
    }

    .tag {
        display: inline-block;
        padding: 5px 12px;
        border-radius: 30px;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .tag-primary {
        background: rgba(67, 97, 238, 0.1);
        color: var(--primary);
    }

    .tag-success {
        background: rgba(76, 201, 240, 0.1);
        color: #06b6d4;
    }

    .tag-warning {
        background: rgba(245, 158, 11, 0.1);
        color: var(--warning);
    }

    .evaluation {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        margin-top: 10px;
        border: 1px solid #f0f2f5;
    }

    .performance-chart {
        display: flex;
        align-items: flex-end;
        gap: 15px;
        height: 200px;
        margin-top: 20px;
        padding: 0 10px;
        border-bottom: 1px solid var(--border);
    }

    .chart-bar {
        flex: 1;
        background: var(--light-gray);
        border-radius: 6px 6px 0 0;
        position: relative;
        min-height: 10px;
    }

    .chart-fill {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, var(--primary), var(--accent));
        border-radius: 6px 6px 0 0;
        transition: height 0.5s ease;
    }

    .chart-label {
        position: absolute;
        bottom: -25px;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 0.85rem;
        color: var(--gray);
    }

    /* 响应式设计 */
    @media (max-width: 992px) {
        .profile-card {
            flex-direction: column;
        }

        .profile-left {
            width: 100%;
        }

        .info-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 768px) {
        .nav-links {
            display: none;
        }

        .content-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 15px;
        }

        .action-buttons {
            width: 100%;
            justify-content: space-between;
        }

        .btn {
            flex: 1;
            justify-content: center;
        }
    }
  </style>
</head>
<body>
<!-- 顶部导航栏 - 自定义Logo区域 -->
<div class="header">
  <div class="logo-container">
    <!-- 自定义Logo图片 -->
    <img src="logo1.jpg" alt="企业Logo" class="custom-logo">
    <div class="logo-text">星链</div>
  </div>

  <div class="nav-links">
    <div class="nav-item" onclick="window.location.href='companies.html'">我的企业</div>
    <div class="nav-item" onclick="window.location.href='bs.html'">背调查询</div>
    <div class="nav-item active">人才档案管理</div>
    <div class="nav-item" onclick="window.location.href='vip.html'">会员开通</div>
  </div>

  <div class="user-area">

    <div class="user-avatar">管</div>
  </div>
</div>

<!-- 主内容区 -->
<div class="main-content">
  <!-- 左侧菜单 - 修改部分 -->
  <div class="sidebar">
    <div class="menu-title">人才档案管理</div>
    <div class="menu-item">
      <i class="fas fa-file-medical"></i>
      <span>档案建立</span>
    </div>
    <div class="menu-item active">
      <i class="fas fa-search"></i>
      <span>档案查询</span>
    </div>
    <div class="menu-item">
      <i class="fas fa-user-check"></i>
      <span>在职人员档案管理</span>
    </div>
  </div>

  <!-- 右侧内容区 -->
  <div class="content-area">
    <div class="content-header">
      <h1 class="page-title">人才档案详情</h1>
      <div class="action-buttons">
        <button class="btn btn-outline">
          <i class="fas fa-edit"></i> 编辑档案
        </button>
        <button class="btn btn-primary">
          <i class="fas fa-print"></i> 打印档案
        </button>
      </div>
    </div>

    <!-- 人才档案卡片 -->
    <div class="profile-card">
      <div class="profile-left">
        <div class="profile-photo">
          <div class="profile-photo-placeholder">
            <i class="fas fa-user"></i>
            <div>人才照片</div>
          </div>
        </div>
        <div class="photo-action">
          <i class="fas fa-camera"></i> 上传照片
        </div>
      </div>

      <div class="profile-right">
        <!-- 基本信息部分 -->
        <div class="profile-section">
          <div class="section-title">
            <i class="fas fa-id-card"></i>
            基本信息
          </div>
          <div class="info-grid">
            <div class="info-item">
              <div class="info-label">姓名</div>
              <div class="info-value">张明哲</div>
            </div>
            <div class="info-item">
              <div class="info-label">性别</div>
              <div class="info-value">男</div>
            </div>
            <div class="info-item">
              <div class="info-label">职位</div>
              <div class="info-value">高级产品经理</div>
            </div>
            <div class="info-item">
              <div class="info-label">工号</div>
              <div class="info-value">PM20250086</div>
            </div>
            <div class="info-item">
              <div class="info-label">联系方式</div>
              <div class="info-value">13800138000</div>
            </div>
            <div class="info-item">
              <div class="info-label">电子邮箱</div>
              <div class="info-value">zhangmz@company.com</div>
            </div>
          </div>
        </div>

        <!-- 总体评价部分 -->
        <div class="profile-section">
          <div class="section-title">
            <i class="fas fa-star"></i>
            总体评价
          </div>
          <div class="evaluation">
            <div class="info-value">
              <span class="tag tag-success">优秀员工</span>
              <span class="tag tag-primary">创新能手</span>
              <span class="tag tag-warning">潜力骨干</span>
            </div>
            <p style="margin-top: 15px; line-height: 1.6;">
              该员工在产品设计和团队管理方面表现突出，多次带领团队完成重要项目。
              具备优秀的沟通能力和创新思维，是公司重点培养的核心人才。
            </p>
          </div>
        </div>

        <!-- 绩效考核部分 -->
        <div class="profile-section">
          <div class="section-title">
            <i class="fas fa-chart-line"></i>
            绩效考核
          </div>
          <div class="performance-chart" id="performance-chart">
            <!-- 图表由JavaScript生成 -->
          </div>
        </div>

        <!-- 备注部分 -->
        <div class="profile-section">
          <div class="section-title">
            <i class="fas fa-sticky-note"></i>
            备注
          </div>
          <textarea style="width: 100%; height: 100px; padding: 15px; border: 1px solid var(--border); border-radius: 8px; resize: none;">
2025年Q1：完成新产品线规划，获得管理层高度认可
2025年Q2：带领团队完成产品上线，用户反馈良好
                        </textarea>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  // 生成绩效考核图表
  function generatePerformanceChart() {
      const chart = document.getElementById('performance-chart');
      chart.innerHTML = '';

      const quarters = ['Q1 2024', 'Q2 2024', 'Q3 2024', 'Q4 2024', 'Q1 2025'];
      const scores = [85, 78, 92, 88, 95];
      const maxHeight = 180; // 图表最大高度

      // 找到最高分用于计算比例
      const maxScore = Math.max(...scores);

      quarters.forEach((quarter, index) => {
          const barHeight = (scores[index] / maxScore) * maxHeight;

          const bar = document.createElement('div');
          bar.className = 'chart-bar';
          bar.innerHTML = `
              <div class="chart-fill" style="height: ${barHeight}px"></div>
              <div class="chart-label">${quarter}</div>
          `;

          // 添加分数标签
          const scoreLabel = document.createElement('div');
          scoreLabel.style.position = 'absolute';
          scoreLabel.style.top = '5px';
          scoreLabel.style.left = '0';
          scoreLabel.style.right = '0';
          scoreLabel.style.textAlign = 'center';
          scoreLabel.style.color = 'white';
          scoreLabel.style.fontWeight = 'bold';
          scoreLabel.textContent = scores[index];

          bar.querySelector('.chart-fill').appendChild(scoreLabel);
          chart.appendChild(bar);
      });
  }

  // 页面加载完成后执行
  document.addEventListener('DOMContentLoaded', function() {
      generatePerformanceChart();

      // 模拟数据加载效果
      setTimeout(() => {
          document.querySelector('.profile-card').style.opacity = '1';
      }, 300);

      // 自定义Logo上传功能
      const logoUpload = document.createElement('input');
      logoUpload.type = 'file';
      logoUpload.accept = 'image/*';
      logoUpload.style.display = 'none';
      document.body.appendChild(logoUpload);

      // 点击Logo可更换
      document.querySelector('.custom-logo').addEventListener('click', function() {
          logoUpload.click();
      });

      logoUpload.addEventListener('change', function(e) {
          const file = e.target.files[0];
          if (file) {
              const reader = new FileReader();
              reader.onload = function(event) {
                  document.querySelector('.custom-logo').src = event.target.result;
              }
              reader.readAsDataURL(file);
          }
      });
  });
</script>
</body>
</html>